﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Entity
{
    public class Order
    {
        public string OrderID
        {
            get;
            set;
        }

        public string CustomName
        {
            get;
            set;
        }

        public float Payed
        {
            get;
            set;
        }

        public DateTime OrderDate
        {
            get;
            set;
        }

        public List<OrderItem> Items
        {
            get;
            set;
        }

        public Order()
        {
            OrderID = "";
            CustomName = "";
            Payed = 0f;
            OrderDate = DateTime.Now;
            Items = new List<OrderItem>();
        }

        public void AddOrderItem(OrderItem item)
        {
            if (!Items.Contains(item))
                Items.Add(item);
        }
    }
}
